<h1><?php echo __('Settings'); ?></h1>

<form action="<?php echo get_url('plugin/pgallery/save_settings') ?>" method="POST" enctype="multipart/form-data">

	<table class="fieldset" cellpadding="0" cellspacing="0" border="0">
		
		
		<!-- field: imagelib -->
		<tr>
			<td class="label"><label for="lib_gd2"><?php echo __('Image library') ?></label></td>
			<td class="field">
				<label for="lib_gd2"><input type="radio" name="lib" value="gd2" id="lib_gd2" <?php echo ($settings['lib'] == 'gd2') ? 'checked="checked"' : ''; ?>/>GD2</label><br />
				<label for="lib_im"><input type="radio" name="lib" value="im" id="lib_im" <?php echo ($settings['lib'] == 'im') ? 'checked="checked"' : ''; ?>/>ImageMagick</label>
			</td>
			<td class="help"></td>
		</tr>
		
		
		<!-- field: im_path (path to ImageMagick) -->
		<tr>
			<td class="label"><label for="im_path"><?php echo __('ImageMagick path') ?></label></td>
			<td class="field"><input class="textbox" id="im_path" maxlength="50" name="im_path" size="50" type="text" value="<?php echo $settings['im_path'] ?>" /></td>
			<td class="help"><?php echo __('Required.'); ?></td>
		</tr>
		
		
		<!-- field: Upload path -->
		<tr>
			<td class="label"><label for="upload_path"><?php echo __('Upload path') ?></label></td>
			<td class="field"><select name="upload_path" id="upload_path"><?php echo $dirs ?></select></td>
			<td class="help"><?php echo __('Folder where images will be uploaded to and stored at'); ?></td>
		</tr>
		
		
		<!-- field: size_small -->
		<tr>
			<td class="label"><label for="size_small"><?php echo __('Image size: thumbnail') ?></label></td>
			<td class="field"><input style="width:inherit" class="textbox" id="size_small" maxlength="4" name="size_small" size="10" type="text" value="<?php echo $settings['size_small'] ?>" /></td>
			<td class="help"><?php echo __('Required.'); ?></td>
		</tr>
		
		
		<!-- field: size_medium -->
		<tr>
			<td class="label"><label for="size_medium"><?php echo __('Image size: medium') ?></label></td>
			<td class="field"><input style="width:inherit" class="textbox" id="size_medium" maxlength="4" name="size_medium" size="10" type="text" value="<?php echo $settings['size_medium'] ?>" /></td>
			<td class="help"><?php echo __('Required.'); ?></td>
		</tr>
		
		
		<!-- field: size_large -->
		<tr>
			<td class="label"><label for="size_large"><?php echo __('Image size: large view') ?></label></td>
			<td class="field"><input style="width:inherit" class="textbox" id="size_large" maxlength="4" name="size_large" size="10" type="text" value="<?php echo $settings['size_large'] ?>" /></td>
			<td class="help"><?php echo __('Required.'); ?></td>
		</tr>
		
		
	</table>


	<p class="buttons">
	<input class="button" name="commit" type="submit" accesskey="s" value="<?php echo __('Save'); ?>" />
	<?php echo __('or'); ?> <a href="<?php echo get_url('plugin/pgallery') ?>"><?php echo __('Cancel'); ?></a>
	</p>


</form>


<script type="text/javascript">
// <![CDATA[
Field.activate('name');
// ]]>
</script>